<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUpSalaryTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('up_salary', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('assign')->nullable()->index()->comment('归属者');
            $table->string('before_rank')->nullable()->comment('之前职级');
            $table->string('before_salary')->nullable()->comment('之前薪水');
            $table->string('now_rank')->nullable()->comment('现在职级');
            $table->string('now_salary')->nullable()->comment('现在薪水');
            $table->tinyInteger('status')->default(1)->index()->comment('状态：-1删除，0审核/禁用，1启用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('up_salary');
    }
}
